]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
switcherPopup: Always show the arrows if the popup is scrollable
authorJonh Wendell <jonh.wendell@intel.com>
Mon, 13 Jan 2014 17:43:01 +0000 (15:43 -0200)
committerJonh Wendell <jonh.wendell@intel.com>
Mon, 13 Jan 2014 18:02:35 +0000 (16:02 -0200)
Currently we only show/hide the left and right arrows when
we reach the initial/end position. This patch changes this
behaviour by showing the arrows whenever is a scroll is possible.

https://bugzilla.gnome.org/show_bug.cgi?id=711467

js/ui/switcherPopup.js

index 3538825e91bca46412e4cf0726d9e01ca09d2555..3b1532f335c98e4928c52d34f3a072371152570b 100644 (file)
@@ -452,10 +452,9 @@ const SwitcherList = new Lang.Class({
                            time: POPUP_SCROLL_TIME,
                            transition: 'easeOutQuad',
                            onComplete: Lang.bind(this, function () {
-                                if (this._highlighted == 0) {
+                                if (this._highlighted == 0)
                                     this._scrollableLeft = false;
-                                    this.actor.queue_relayout();
-                                }
+                                this.actor.queue_relayout();
                            })
                           });
     },
@@ -477,10 +476,9 @@ const SwitcherList = new Lang.Class({
                            time: POPUP_SCROLL_TIME,
                            transition: 'easeOutQuad',
                            onComplete: Lang.bind(this, function () {
-                                if (this._highlighted == this._items.length - 1) {
+                                if (this._highlighted == this._items.length - 1)
                                     this._scrollableRight = false;
-                                    this.actor.queue_relayout();
-                                }
+                                this.actor.queue_relayout();
                             })
                           });
     },